.class public Lcom/adview/adapters/FractalAdapter;
.super Lcom/adview/adapters/AdViewAdapter;
.source "FractalAdapter.java"

# interfaces
.implements Lcom/fractalist/android/ads/AdStatusListener;


# instance fields
.field view:Lcom/fractalist/android/ads/ADView;


# direct methods
.method public constructor <init>(Lcom/adview/AdViewLayout;Lcom/adview/obj/Ration;)V
    .locals 0
    .parameter "adViewLayout"
    .parameter "ration"

    .prologue
    .line 25
    invoke-direct {p0, p1, p2}, Lcom/adview/adapters/AdViewAdapter;-><init>(Lcom/adview/AdViewLayout;Lcom/adview/obj/Ration;)V

    .line 27
    return-void
.end method


# virtual methods
.method public fullScreenAdClose(Z)V
    .locals 0
    .parameter "arg0"

    .prologue
    .line 111
    return-void
.end method

.method public handle()V
    .locals 7

    .prologue
    .line 33
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v4

    sget-object v5, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v4, v5, :cond_0

    .line 34
    const-string v4, "AdView SDK v1.7.0"

    const-string v5, "Into Fractal"

    invoke-static {v4, v5}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 35
    :cond_0
    iget-object v4, p0, Lcom/adview/adapters/FractalAdapter;->adViewLayoutReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v4}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/adview/AdViewLayout;

    .line 36
    .local v1, adViewLayout:Lcom/adview/AdViewLayout;
    if-nez v1, :cond_2

    .line 62
    :cond_1
    :goto_0
    return-void

    .line 39
    :cond_2
    iget-object v3, v1, Lcom/adview/AdViewLayout;->extra:Lcom/adview/obj/Extra;

    .line 40
    .local v3, extra:Lcom/adview/obj/Extra;
    iget v4, v3, Lcom/adview/obj/Extra;->bgRed:I

    iget v5, v3, Lcom/adview/obj/Extra;->bgGreen:I

    iget v6, v3, Lcom/adview/obj/Extra;->bgBlue:I

    invoke-static {v4, v5, v6}, Landroid/graphics/Color;->rgb(III)I

    move-result v2

    .line 43
    .local v2, bgColor:I
    iget-object v4, v1, Lcom/adview/AdViewLayout;->activityReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v4}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/Activity;

    .line 44
    .local v0, activity:Landroid/app/Activity;
    if-eqz v0, :cond_1

    .line 49
    iget-object v4, p0, Lcom/adview/adapters/FractalAdapter;->ration:Lcom/adview/obj/Ration;

    iget-object v4, v4, Lcom/adview/obj/Ration;->key:Ljava/lang/String;

    invoke-static {v4}, Lcom/fractalist/android/ads/ADView;->setPublishId(Ljava/lang/String;)V

    .line 50
    new-instance v4, Lcom/fractalist/android/ads/ADView;

    invoke-direct {v4, v0}, Lcom/fractalist/android/ads/ADView;-><init>(Landroid/content/Context;)V

    iput-object v4, p0, Lcom/adview/adapters/FractalAdapter;->view:Lcom/fractalist/android/ads/ADView;

    .line 52
    iget-object v4, p0, Lcom/adview/adapters/FractalAdapter;->view:Lcom/fractalist/android/ads/ADView;

    const/16 v5, 0x1e

    invoke-virtual {v4, v5}, Lcom/fractalist/android/ads/ADView;->setFreshInterval(I)V

    .line 54
    iget-object v4, p0, Lcom/adview/adapters/FractalAdapter;->view:Lcom/fractalist/android/ads/ADView;

    const/4 v5, 0x0

    invoke-virtual {v4, v5}, Lcom/fractalist/android/ads/ADView;->setFadeImage(Z)V

    .line 55
    iget-object v4, p0, Lcom/adview/adapters/FractalAdapter;->view:Lcom/fractalist/android/ads/ADView;

    invoke-virtual {v4, v2}, Lcom/fractalist/android/ads/ADView;->setBackgroundColor(I)V

    .line 58
    iget-object v4, v1, Lcom/adview/AdViewLayout;->adViewManager:Lcom/adview/AdViewManager;

    invoke-virtual {v4}, Lcom/adview/AdViewManager;->resetRollover()V

    .line 59
    iget-object v4, v1, Lcom/adview/AdViewLayout;->handler:Landroid/os/Handler;

    new-instance v5, Lcom/adview/AdViewLayout$ViewAdRunnable;

    iget-object v6, p0, Lcom/adview/adapters/FractalAdapter;->view:Lcom/fractalist/android/ads/ADView;

    invoke-direct {v5, v1, v6}, Lcom/adview/AdViewLayout$ViewAdRunnable;-><init>(Lcom/adview/AdViewLayout;Landroid/view/ViewGroup;)V

    invoke-virtual {v4, v5}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 60
    invoke-virtual {v1}, Lcom/adview/AdViewLayout;->rotateThreadedDelayed()V

    goto :goto_0
.end method

.method public onClick()V
    .locals 0

    .prologue
    .line 67
    return-void
.end method

.method public onFail()V
    .locals 4

    .prologue
    const/4 v3, 0x0

    .line 71
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v1

    sget-object v2, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v1, v2, :cond_0

    .line 72
    const-string v1, "AdView SDK v1.7.0"

    const-string v2, "Fractal failure"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 74
    :cond_0
    iget-object v1, p0, Lcom/adview/adapters/FractalAdapter;->view:Lcom/fractalist/android/ads/ADView;

    invoke-virtual {v1, v3}, Lcom/fractalist/android/ads/ADView;->setAdStatusListener(Lcom/fractalist/android/ads/AdStatusListener;)V

    .line 75
    iput-object v3, p0, Lcom/adview/adapters/FractalAdapter;->view:Lcom/fractalist/android/ads/ADView;

    .line 77
    iget-object v1, p0, Lcom/adview/adapters/FractalAdapter;->adViewLayoutReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/adview/AdViewLayout;

    .line 78
    .local v0, adViewLayout:Lcom/adview/AdViewLayout;
    if-nez v0, :cond_1

    .line 83
    :goto_0
    return-void

    .line 81
    :cond_1
    iget-object v1, v0, Lcom/adview/AdViewLayout;->adViewManager:Lcom/adview/AdViewManager;

    invoke-virtual {v1}, Lcom/adview/AdViewManager;->resetRollover_pri()V

    .line 82
    invoke-virtual {v0}, Lcom/adview/AdViewLayout;->rotateThreadedPri()V

    goto :goto_0
.end method

.method public onReceiveAd()V
    .locals 3

    .prologue
    .line 87
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v1

    sget-object v2, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v1, v2, :cond_0

    .line 88
    const-string v1, "AdView SDK v1.7.0"

    const-string v2, "Fractal success"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 90
    :cond_0
    iget-object v1, p0, Lcom/adview/adapters/FractalAdapter;->view:Lcom/fractalist/android/ads/ADView;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Lcom/fractalist/android/ads/ADView;->setAdStatusListener(Lcom/fractalist/android/ads/AdStatusListener;)V

    .line 92
    iget-object v1, p0, Lcom/adview/adapters/FractalAdapter;->adViewLayoutReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/adview/AdViewLayout;

    .line 93
    .local v0, adViewLayout:Lcom/adview/AdViewLayout;
    if-nez v0, :cond_1

    .line 100
    :goto_0
    return-void

    .line 97
    :cond_1
    iget-object v1, v0, Lcom/adview/AdViewLayout;->adViewManager:Lcom/adview/AdViewManager;

    invoke-virtual {v1}, Lcom/adview/AdViewManager;->resetRollover()V

    .line 99
    invoke-virtual {v0}, Lcom/adview/AdViewLayout;->rotateThreadedDelayed()V

    goto :goto_0
.end method

.method public onRefreshAd()V
    .locals 2

    .prologue
    .line 104
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v0

    sget-object v1, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v0, v1, :cond_0

    .line 105
    const-string v0, "AdView SDK v1.7.0"

    const-string v1, "Fractal, onRefreshAd"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 106
    :cond_0
    return-void
.end method
